﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MINERP.MODEL.FoundationModel
{
    public class SHOP_Bill_Info
    {
        #region 私有字段
        private Shop_Info _shopId;
        private int _billId;
        private int _billOrderCode;
        private DateTime _createTime;

        #endregion

        /// <summary>
        /// 帐单总金额
        /// </summary>
        public double BillCount { get; set; }
        /// <summary>
        /// 商户余额
        /// </summary>
        public double ShopBalance { get; set; }



        public int Status { get; set; }
        public string StatuName
        {
            get
            {
                if (Status == 0)
                {
                    return "未付款";
                }
                else if (Status == 1)
                {
                    return "已付款";
                }
                else if (Status == 2)
                {

                    return "转移走掉的账单";
                }
                else if (Status == 3)
                {

                    return "删除的帐单";
                }
                else
                {
                    return "不明状态";
                }
            }
        }

        public List<Bill_Detail_Info> List_Detail { get; set; }//帐单里面的产品列表


        public int Result { get; set; }
        public bool NeedPrice { get; set; }

        #region 公开属性
        public Shop_Info Shop
        {
            get { return _shopId; }
            set { _shopId = value; }
        }
        public int BillId
        {
            get { return _billId; }
            set { _billId = value; }
        }
        public int BillOrderCode
        {
            get { return _billOrderCode; }
            set { _billOrderCode = value; }
        }
        public DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }
        public int CreditLevel
        {
            get;
            set;
        }
        public string Salesman
        {
            get { return Shop.Salesman; }
        }
        public bool IsAssignByCustom
        {
            get;
            set;
        }
        public string CheckType
        {
            //get {
            //     switch (_shopId.CheckOutType)
            //        {
            //         case 0:return  "预付款";

            //                break;
            //         case 1 :return  "信用额度";

            //                break;
            //         case 2: return "现结";

            //                break;
            //         case 3 :return  "结账日期";

            //                break;
            //         case 4:return "信用额度与结账日期";

            //                break;
            //         case 5 :return  "先结";

            //                break;
            //            default:
            //             return  "预付款";
            //                break;
            //}
            get;
            set;
        }
        public string CheckTypeString
        {
            get
            {
                switch (_shopId.CheckOutType)
                {
                    case 0: return "预付款";

                        break;
                    case 1: return "信用额度";

                        break;
                    case 2: return "现结";

                        break;
                    case 3: return "结账日期";

                        break;
                    case 4: return "信用额度与结账日期";

                        break;
                    case 5: return "先结";

                        break;
                    default:
                        return "预付款";
                        break;
                }

            }
        }
        #endregion
    }
}
